package com.heima.mapper.vmMapper;

import com.github.pagehelper.Page;
import com.heima.pojo.pojo.SkuClass;
import com.heima.pojo.dto.ClassPageDto;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface SkuClassMapper {
    @Insert("insert into tb_sku_class(class_id, class_name, parent_id) values (#{classId},#{className},#{parentId})")
    void add(SkuClass skuClass);


    Page<SkuClass> pageQuery(ClassPageDto dto);

    @Select("select * from tb_sku_class where class_id =#{classId}")
    SkuClass queryOne(Integer classId);
}
